<template>
    <div>
        <van-nav-bar :title="props.title" v-if="isShow"/>
        <van-nav-bar :title="props.title" left-text="返回" left-arrow @click-left="router.go(-1)" v-else/>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { useRoute, useRouter } from 'vue-router'

const router = useRouter()
const props = defineProps(['title'])
let isShow = ref(true)

if(props.title == '首页' || props.title == '商城' || props.title == '消息'|| props.title == '我'){
    isShow.value = true
}   else{
    isShow.value = false
}
</script>

<style lang="scss" scoped></style>